﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
 Inherits="System.Web.Mvc.ViewPage<Capa_Dominio.Local>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	.:. Systema Studio7i .:.
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>Registrar nuevo Local</h2>
     <% Html.EnableClientValidation(); %>
	<% using (Html.BeginForm("Crear", "Local", FormMethod.Post)){%>
		<%: Html.ValidationSummary(true) %>
		<fieldset>
			<legend>Datos del Local</legend>
			
			<div class="editor-label">
				<%: Html.LabelFor(model => model.NombreLocal) %>
			</div>
			<div class="editor-field">
				<%: Html.TextBoxFor(model => model.NombreLocal) %>
				<%: Html.ValidationMessageFor(model => model.NombreLocal) %>
			</div>
			 <div class="editor-label">
				Distrito
			</div>
			<div class="editor-field"> 
				<%: Html.DropDownList("codDistrito", (IEnumerable<SelectListItem>)TempData["distritos"])%>
			</div>
			<div class="editor-label">
				<%: Html.LabelFor(model => model.Direccion) %>
			</div>
			<div class="editor-field">
				<%: Html.TextBoxFor(model => model.Direccion) %>
				<%: Html.ValidationMessageFor(model => model.Direccion) %>
			</div>
			<p>
				<input type="submit" value="Create" />
			</p>
		</fieldset>

	<% } %>
	<div>
		<%: Html.ActionLink("Ir a la Lista", "Index") %>
	</div>

</asp:Content>

